﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PServiceBus.Core.Interface;
using PServiceBus.Core.Runtime.Messages;

namespace PServiceBus.Transports.Handlers {
    public sealed class RabbitMQTransportHandler : ITransportHandler<RabbitMQTransport> {
        #region ITransportHandler<RabbitMQTransport> Members

        public IMessageHandler<TMessage> CreateHandler<TMessage>(RabbitMQTransport transport) where TMessage : class {
            return MessageHandlerBase<TMessage, string>.New<RabbitMQTransport>(this, new RabbitMQ.Provider<string>(), () => transport.Path);
        }

        public TimeSpan Interval { get; set; }

        public int BatchSize { get; set; }

        #endregion
    }
}
